package com.xian;

public class Test {
    public static void main(String[] args) {

        //创建对象
        Student s = new Student();

        //调用无参构造器
        s.setName("贤");
        s.setAge(18);
        s.setSex('男');

        System.out.println(s.getName());
        System.out.println(s.getAge());
        System.out.println(s.getSex());

        //有参构造
        Student student = new Student("贤",18,'男');
        System.out.println(student.getName());
        System.out.println(student.getAge());
        System.out.println(student.getSex());

    }
}
